﻿using System.Threading;
using VoiceShieldCS;

namespace BasicPhraseTalk
{
    public class Program
    {
        static VoiceShield vShield = new VoiceShield(80);
        static byte[][] phrases;

        public static void Main()
        {
            phrases = new byte[][]{
            new byte[] {31,34,42,43,255},
            new byte[] {51,48,34,42,40,255},
            new byte[] {57,33,38,52,1,50,255}
            };

            while (true)
            {
                for (byte i = 0; i < 3; i++)
                {
                    SayPhrase(i);
                    Thread.Sleep(1000);
                }
            }
        }

        private static void SayPhrase(byte phrase)
        {
            byte[] line = phrases[phrase];
            foreach (byte word in line)
            {
                if (word == 255)
                    break;
                vShield.ISDPlayToEOM(word);
            }
        }
    }
}
